Re: Multilingual database

Поиск
Список
Период
Сортировка
От M. Bastin
Тема Re: Multilingual database
Дата
Msg-id a05210607bae7083d5a57@[213.119.70.233]
обсуждение исходный текст
Ответ на Re: Multilingual database  (Terence Ng <ngterry2000@yahoo.com.hk>)
Ответы Re: Multilingual database  (Terence Ng <ngterry2000@yahoo.com.hk>)
Список pgsql-novice
At 11:12 AM +0800 5/13/03, Terence Ng wrote:
>I see. Thank you very much.  But I have come up
>another question.  For the language-dependent
>information, there is a code to differentiate each
>record, and every column has the same language.


No!  One single column contains all descriptions, regardless of their language!
If you'd have a column per language, then you'd get into the same
kind of problems as when you'd have a table per language.

Example:

CODE    LANGUAGE    DESCRIPTION
x123    French        frites surgeles
x123    English        frozen french fries
z456    French        gaufres belges
z456    English        belgian waffles

>  What
>if I expand my web site, allowing customers from
>different countries lookup their orders.  How do I
>record their information if I allow them to register
>their info in their languages?  For example, I will
>have customer_id and customer_name.  How do I record
>customer_name?  Is it a good practice if I create
>every language a column, with customer_id as a
>relation?

Your customer data is probably not language dependent.  One table
should be enough.

Example:

ID    LAST NAME    FIRST NAME    GENDER    LANGUAGE    ADDRESS
101    Dupont        Louis        m    French        ... France
102    Jones        Tina        f    English        ... USA

The way you present this information on screen should be in the
customer's language, but each bit of customer information you
actually want to store, is unique per customer, and the language is
not relevant: a last name is just always a last name, whether the
person speaks French or English.

Marc


В списке pgsql-novice по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: can't alter user with the postgres user
Следующее
От: Katy Earl
Дата:
Сообщение: Re: can't alter user with the postgres user